//
//  QRCodeManager.h
//  oc_demo
//
//  Created by haigui on 2021/8/5.
//

#import <UIKit/UIKit.h>
#import "QRCodePreviewView.h"
NS_ASSUME_NONNULL_BEGIN

@interface QRCodeManager : NSObject

#pragma mark - 扫描二维码/条形码

- (instancetype)initWithPreviewView:(QRCodePreviewView *)previewView completion:(void(^)(void))completion;

- (void)startScanningWithCallback:(void(^)(NSString *))callback autoStop:(BOOL)autoStop;
- (void)startScanningWithCallback:(void(^)(NSString *))callback;
- (void)stopScanning;

- (void)presentPhotoLibraryWithRooter:(UIViewController *)rooter callback:(void(^)(NSString *))callback;

@end

NS_ASSUME_NONNULL_END
